package com.shitou.shitouproduct.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

import lombok.Data;

/**
 * spu属性值-产品属性值
 *
 * @author shitouren
 * @email 3076767823@qq.com
 * @date 2023-03-17 19:24:40
 */
@Data
@TableName("pms_product_attr_value")
public class ProductAttrValueEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * id
	 */
	@TableId
	private Long id;
	/**
	 * 商品id
	 */
	private Long spuId;
	/**
	 * 属性id
	 */
	private Long attrId;
	/**
	 * 属性名
	 */
	private String attrName;
	/**
	 * 属性值
	 */
	private String attrValue;
	/**
	 * 顺序
	 */
	private Integer attrSort;
	/**
	 * 快速展示【是否展示在介绍上；0-否 1-是】
	 */
	private Integer quickShow;
	/**
	 *
	 */
	private Integer status;

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (!(o instanceof ProductAttrValueEntity)) return false;
		ProductAttrValueEntity that = (ProductAttrValueEntity) o;
		return Objects.equals(getId(), that.getId()) && Objects.equals(getSpuId(), that.getSpuId()) && Objects.equals(getAttrId(), that.getAttrId()) && Objects.equals(getAttrName(), that.getAttrName()) && Objects.equals(getAttrValue(), that.getAttrValue()) && Objects.equals(getAttrSort(), that.getAttrSort()) && Objects.equals(getQuickShow(), that.getQuickShow()) && Objects.equals(getStatus(), that.getStatus());
	}

	@Override
	public int hashCode() {
		return Objects.hash(getId(), getSpuId(), getAttrId(), getAttrName(), getAttrValue(), getAttrSort(), getQuickShow(), getStatus());
	}
}
